package com.oppo.cloud.syncer.domain;

import com.oppo.cloud.syncer.domain.sync.SchemaDescriptor;

import java.util.List;

/**
 * @author: jzhou
 * @date: 2024/10/17-16:11
 * @version: 1.0
 * @description: compass
 */


public class DebeziumMessageWithSchema {
    private Schema schema;
    private DebeziumMessage payload;

    public Schema getSchema() {
        return schema;
    }

    public void setSchema(Schema schema) {
        this.schema = schema;
    }

    public DebeziumMessage getPayload() {
        return payload;
    }

    public void setPayload(DebeziumMessage payload) {
        this.payload = payload;
    }

    private static class Schema {
        private String type;
        private List<SchemaDescriptor> fields;
        private Boolean optional;
        private String name;

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public List<SchemaDescriptor> getFields() {
            return fields;
        }

        public void setFields(List<SchemaDescriptor> fields) {
            this.fields = fields;
        }

        public Boolean getOptional() {
            return optional;
        }

        public void setOptional(Boolean optional) {
            this.optional = optional;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }
}
